<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			// 不传name, sex，传一个对象进去(封装插件一定要这样写)
			// var opt = {
			// 	name: ddd,
			// 	sex: ddggg
			// }
			function Teacher(opt){
				this.name = opt.name;
				this.sex = opt.sex;
				this.smoke = function(){
					console.log('I am smoking');
				}
			}
			
			// console.log(name);
			
			var teacher1 = new Teacher({
				name: '张三',
				age: '男'
			});
			var teacher2 = new Teacher({
				name: '李四',
				sex: '女'
			});
			console.log(teacher1, teacher2);
			
			function test(){
				
			}

		</script>
	</body>
</html>
